package com.gs.threadpackage;

/**
 * @ProjectName: springbootmybitstest
 * @Package: com.gs.threadpackage
 * @Description: java类作用描述
 * @Author: Administrator
 * @CreateDate: 2018/6/28 11:31
 * @UpdateUser: Administrator
 * @UpdateDate: 2018/6/28 11:31
 * @UpdateRemark: The modified content
 * @Version: 1.0
 **/
public class Custumer implements Runnable {
    private Clerk clerk;
    public Custumer(Clerk clerk){
        this.clerk=clerk;
    }

    @Override
    public void run() {
        System.out.println("消费者开始消费产品");
        while (true){
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            clerk.getProduct();
        }

    }
}
